package cn.luckdou.PC.Hbean;

import cn.luckdou.commons.utils.Base64;
import cn.luckdou.commons.utils.StringUtils;

public class Hlogin {
    private String loginName;
    private String pass;
    private String phone;
    private String code;
    private String type;

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean decode() {
        try{
            if(StringUtils.isNotBlank(loginName))  this.loginName=new String(Base64.decode(loginName));
            if(StringUtils.isNotBlank(pass))  this.pass=new String(Base64.decode(pass));
            if(StringUtils.isNotBlank(phone))  this.phone=new String(Base64.decode(phone));
            if(StringUtils.isNotBlank(code))  this.code=new String(Base64.decode(code));
        } catch (Exception e){
            return false;
        }
        return true;
    }
}
